﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BlueCMS.Core.Data.Query.Conditions
{
    public class ConditionNode : ConditionBase, IMultiNode, IBinaryNode, IUnaryNode, IEndNode
    {
        public ConditionNodeType Type { get; private set; }

        public ConditionNode(ConditionNodeType type)
        {
            Type = type;
        }

        IEndNode IMultiNode.SubSelect(Action<SelectQuery> subquery)
        {
            return (IEndNode)base.SubSelect(subquery);
        }

        IMultiStartNode IMultiNode.Start()
        {
            return (IMultiStartNode)base.Start();
        }

        IEndNode IBinaryNode.Aggregate(string clause)
        {
            return (IEndNode)base.Aggregate(clause);
        }

        IEndNode IBinaryNode.Column(string name)
        {
            return (IEndNode)base.Column(name);
        }

        IEndNode IBinaryNode.Constant(object value)
        {
            return (IEndNode)base.Constant(value);
        }

        IEndNode IBinaryNode.Parameter(object value)
        {
            return (IEndNode)base.Parameter(value);
        }

        ILHSNode IBinaryNode.SubSelect(Action<SelectQuery> subquery)
        {
            return (ILHSNode)base.SubSelect(subquery);
        }

        IEndNode IEndNode.EndGroup()
        {
            return (IEndNode)base.EndGroup();
        }

        IStartNode IEndNode.And()
        {
            return (IStartNode)base.And();
        }

        IStartNode IEndNode.Or()
        {
            return (IStartNode)base.Or();
        }
    }
}
